

package com.hazelcast.spi.impl.operationservice;

import com.hazelcast.spi.impl.operationservice.impl.operations.Backup;

import java.util.function.Consumer;

/**
 * SPI for blocking or offloaded backup operations. Such operations should
 * send backup ACK on their own after they have finished execution.
 *
 * @see BlockingOperation
 * @see Offload
 * @since 6.0
 */
public interface AsynchronouslyExecutingBackupOperation {
    /**
     * This method is used to inject {@link Backup#afterRun()} to offloaded operation.
     * <p>
     * Its goal is to call it on completion of offloaded backup operation.
     *
     * @param backupOpAfterRun {@link Backup#afterRun()}
     */
    void setBackupOpAfterRun(Consumer<Operation> backupOpAfterRun);
}
